#include<iostream>
using namespace std;
double fact(double k){
	if(k==1){
		return 1;
	}
	return fact(k-1)*k;
}
int main(){
	int n;
	double sum=0;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		sum+=1/fact(i);
	}
	printf("sum=%.5lf\n",sum);
	return 0;
}
